package cn.itsource.ymcc.service.impl;

import cn.itsource.ymcc.domain.Login;
import cn.itsource.ymcc.mapper.LoginMapper;
import cn.itsource.ymcc.service.ILoginService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 登录表 服务实现类
 * </p>
 *
 * @author gwk
 * @since 2023-08-01
 */
@Service
@Slf4j
public class LoginServiceImpl extends ServiceImpl<LoginMapper, Login> implements ILoginService {

    /**
     * 注册
     * @param login
     * @return 返回 loginid
     */
    @Override
    public Long register(Login login) {
        //TODO 后期密码加密，认证授权的客户端保存
        insert(login);
        log.info("注册成功{}",login.getId());
        return login.getId();
    }

}
